package java7;

import java.lang.management.ManagementFactory;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Stream;

public class A {

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);

        for (Integer i : list) {
            if (i < 3) {
                continue;
            }

        }

        Stream<Integer> s = list.stream().map(e -> 1 + e).filter(e -> (e > 3));
        s.forEach(System.out::println);

        Map map = new HashMap<>();
        map.put("1", "2");
        map.forEach((k, v) -> System.out.println(k + "|" + v));

        System.out.println(String.format("%s -> %s", 1, 2));
        ManagementFactory.getMemoryPoolMXBeans().forEach(e -> System.out.println(e.getName()));
    }

    public void sys() {

    }
}
